/**
  netcdf-utils.h - Created by Timothy Morey on 5/22/2012

  This file contains utility functions to help with NetCDF tasks.
*/

#ifndef __NETCDF_UTILS_H
#define __NETCDF_UTILS_H

#include <stddef.h>

#include "libnvn.h"

/**
  Gets the number of bytes used to store the standard NetCDF data type.

  @param[in] type A NetCDF data type.  It is assumed that type corresponds to a
  member of the nc_type enum.
  @param[out] size The size of the given type.

  @return An nvn error code indicating if the operation was successful.
*/
EXPORT int GetTypeSize(int type, size_t* size);

/**
  Prints a message about an error received from the NetCDF library.

  @param[in] msg A verbose description that helps identify the impact of the error
  on the current program.
  @param[in] err A NetCDF error code.

  @return An nvn error code indicating if the operation was successful.
*/
EXPORT int PrintNetCDFError(const char* msg, int err);

#endif